DIR=$(shell pwd)
BIN_DIR=${GOPATH}/bin
BIN_LINUX_DIR=$(DIR)/bin/linux-amd64
BUILD_ENV="CGO_ENABLED=1" # 编译配置环境变量
BUILD_LINUX_ENV="GOOS=linux GOARCH=amd64 " # 编译为linux执行文件
OPSCTL_CODE_DIR=$(DIR)/src/opsctl

update-gopkg:
	go get -u gitee.com/lllgo/gopkg

build:
	cd cmd && CGO_ENABLED=0 go build -o $(BIN_DIR)/opsctl -v ./


build-linux-amd64:
	cd cmd && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(BIN_LINUX_DIR)/opsctl -v ./
